﻿// 1.1.9.03. Write a method that returns the English name of the last digit of a given number.
// Example: for 512 prints "two"; for 1024 -> "four".

using System;

class LastDigitName
{
    public static bool IsItANumber(string numberForCheck)
    {
        int varForCheck = 0;
        return int.TryParse(numberForCheck, out varForCheck);
    }
    public static string NameOfLastDigit(string numberForLastDigitCheck)
    {
        string lastDigitName = null;
        if (IsItANumber(numberForLastDigitCheck) == false)
        {
            numberForLastDigitCheck = "becase the value \"" + numberForLastDigitCheck + "\" is not a number";
        }
        switch ((int)(numberForLastDigitCheck[numberForLastDigitCheck.Length - 1]) - 48)
        {
            case 1: lastDigitName = "one"; break;
            case 2: lastDigitName = "two"; break;
            case 3: lastDigitName = "three"; break;
            case 4: lastDigitName = "four"; break;
            case 5: lastDigitName = "five"; break;
            case 6: lastDigitName = "six"; break;
            case 7: lastDigitName = "seven"; break;
            case 8: lastDigitName = "eight"; break;
            case 9: lastDigitName = "nine"; break;
            case 0: lastDigitName = "zero"; break;
            default: lastDigitName = "There is a big problem with the program, " + numberForLastDigitCheck; break;
        }
        return lastDigitName;
    }
    static void Main()
    {
        while (true)
        {
            Console.WriteLine(NameOfLastDigit((Console.ReadLine())));
        }
    }
}